#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Copyright [Gtlions Lai].
# Create Date:
# Update Date:
"""summarization ahout this script.

detail ahout this script

   Class(): summarization about Class
   ...
   function(): summarization about function
   ...
"""
__authors__ = '"Gtlions Lai" <gtlions.l@qq.com>'

from PyQt4 import QtCore, QtGui
import sys

app = QtGui.QApplication(sys.argv)
w = QtGui.QWidget()
w.setWindowTitle('Stretch Test!')
l = QtGui.QGridLayout(w)
b1 = QtGui.QPushButton('B1')
b2 = QtGui.QPushButton('B2')
b3 = QtGui.QPushButton('B3')
b4 = QtGui.QPushButton('B4')
b5 = QtGui.QPushButton('B5')
b6 = QtGui.QPushButton('B6')
l.addWidget(b1, 0, 0)
l.addWidget(b2, 0, 1)
l.addWidget(b3, 1, 0)
l.addWidget(b4, 1, 1)
l.addWidget(b5, 2, 0)
l.addWidget(b6, 2, 1)
# 设置列比例
# 第1列比例为1
l.setColumnStretch(0, 1)
# 第2列比例为2
l.setColumnStretch(1, 2)
# 设置行比例
# 第1行比例为1
l.setRowStretch(0, 1)
l.setRowStretch(1, 2)
l.setRowStretch(2, 3)

w.show()
app.exec_()


